package com.zbkj.dal.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zbkj.dal.entity.merchant.MerchantEmployee;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 
 * @author JinXinyu
 * @date 2024-03-20 23:26:27
 */
@Mapper
public interface MerchantEmployeeDao extends BaseMapper<MerchantEmployee> {

    @Update("update eb_merchant_employee set employee_no = #{newEmployeeNo}, update_time = current_timestamp where employee_no = #{oldEmployeeNo}")
    void updateEmployeeNo(@Param("oldEmployeeNo") String oldEmployeeNo, @RequestParam("Param") String newEmployeeNo);

    @Update("update eb_merchant_employee e set e.is_enable = 0 where e.employee_no = #{employeeNo}")
    void disableMerchantEmployee(@Param("employeeNo")String employeeNo);
}
